/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package group2assignone.ucm.manager;

import group2assignone.view.manager.*;
import group2assignone.ucm.UCController;
import group2assignone.view.OurView;

/**
 * Use Case: Change UI to Main Manager View                                 <br>
 * Pre-condition: Manager has clicked cancel from a view.                   <br>
 * Post-condition: UI is updated.                                           <br>
 * 1. system closes the  current view                                       <br>
 * 2. system restores the manager main view                                 <br>
 * @author group2                                                           <br>
 */
public class UCCancelAction implements UCController {

    private OurView view;

    public UCCancelAction(OurView view) {
        this.view = view;
    }

    public void run() {
        //1. system closes the current view
        view.dispose();
        //2. system restores the manager main view
        ManagerView manView = ManagerView.getInstance();
        manView.go();
    }
}
